package com.googlecode.spoluyan.google;

import com.googlecode.spoluyan.google.googleapisdiscovery.GoogleAPIsDiscoveryClient;
import com.googlecode.spoluyan.google.googlebloggerdata.GoogleBloggerDataClient;
import com.googlecode.spoluyan.google.googlebooks.GoogleBooksClient;
import com.googlecode.spoluyan.google.googlefeed.GoogleFeedClient;
import com.googlecode.spoluyan.google.googleplus.GooglePlusClient;

public class GoogleAPIClientsHolder {
    private String key;
    private GooglePlusClient googlePlusClient;
    private GoogleFeedClient googleFeedClient;
    private GoogleAPIsDiscoveryClient googleAPIsDiscoveryClient;
    private GoogleBloggerDataClient googleBloggerDataClient;
    private GoogleBooksClient googleBooksClient;

    public GoogleAPIClientsHolder(String key) {
	this.key = key;
	init();
    }

    private void init() {
	googlePlusClient = new GooglePlusClient(key);
	googleFeedClient = new GoogleFeedClient(key);
	googleAPIsDiscoveryClient = new GoogleAPIsDiscoveryClient(key);
	googleBloggerDataClient = new GoogleBloggerDataClient(key);
	googleBooksClient = new GoogleBooksClient(key);
    }

    public GooglePlusClient getGooglePlusClient() {
	return googlePlusClient;
    }

    public GoogleFeedClient getGoogleFeedClient() {
	return googleFeedClient;
    }

    public GoogleAPIsDiscoveryClient getGoogleAPIsDiscoveryClient() {
	return googleAPIsDiscoveryClient;
    }

    public GoogleBloggerDataClient getGoogleBloggerDataClient() {
	return googleBloggerDataClient;
    }

    public GoogleBooksClient getGoogleBooksClient() {
	return googleBooksClient;
    }
}
